package com.bw.zg3.Tab

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.lifecycle.lifecycleScope
import com.bw.base.mvvm.BaseFragment
import com.bw.zg3.Car.CarApter
import com.bw.zg3.Car.CarViewModel
import com.bw.zg3.Home.HomeViewModel
import com.bw.zg3.R
import com.bw.zg3.databinding.FragmentMessageBinding
import kotlinx.coroutines.launch


class MessageFragment : BaseFragment<FragmentMessageBinding,CarViewModel>(){
    val carApter by lazy { CarApter() }
    override fun initView() {
        binding.Mrv.apply {
            adapter=carApter
        }
        lifecycleScope.launch {
            vm.CarResult().collect{
                carApter.submitData(it)
            }
        }

    }

    override fun intiData() {

    }


}